﻿using QD.PushManager.DB;
using System.Linq;
using System.Text;

namespace QD.PushManager.Manager
{
    public static class UserManager
    {
        static string TableName { get { return "sql_s002.dbo.vifo_users"; } }
        /// <summary>
        /// 获取用户名
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        public static string GetUserName(int userid)
        {
            using (var db = new ShtDatabase())
            {
                return db.SingleOrDefault<string>(string.Format("select username from {0} where userid={1}", TableName, userid));
            }
        }
    }
}
